package org.leyi.shop.common.response;

/**
 *
 * description:  TODO
 *<br> create 2024/5/4-23:37
 * @author  lenovo

 */
public enum EnumResponse {
    SYSTEM_ERR(50001,"暂时无法提供服务","系统错误"),
    PASSWORD_ERR(40001,"用户账户或者密码出现了错误","密码错误"),
    AUTHORITY_ERR(40002,"你的权限不足，不能访问该服务","权限不足"),
    //不传入前端，其他都传
    SUCCESS(20000,"请求数据成功","成功"),
    PASSWORD_SHORT_ERR(40003,"密码至少超过6位","密码过短"),
    USER_ACCOUNT_INVALID_ERR(40004,"账号含特殊字符或者长度不够","账号不合法"),
    USER_ACCOUNT_REPEAT_ERR(40005,"该账户已经被注册","账户重复"),
    USER_ACCOUNT_NOT_EXIST_ERR(40006,"用户账户或者密码出现了错误","账号不存在"),
    PARAMETER_ERR(40000,"请求参数错误","参数错误"),
    SERVICE_REQUEST_ERR(50000,"",""),
    USER_NOT_LOGIN(30001,"你还未登录或者登录失效了","登录失效"),
    STORE_OUT_OF_STOCK(20004,"库存不足啦",""),
    PRODUCT_TAKEN_OFF(20005,"商品已经下架了",""),
    PAY_FAIL(40012,"付款失败","");
    private int code;
    private String message;
    private String description;

    EnumResponse(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
